Conventional image resizing methods typically involve the scaling and/or cropping of machine-readable image files. In many image resizing scenarios—particularly when changing the aspect ratio of an image (e.g., from 4:3 to 16:9)—both scaling and cropping fail to adequately protect the content of the image, image scaling typically can only be applied uniformly and, thus, often results in visual distortions of important image content when the aspect ratio of an image is modified image cropping typically can only remove pixels from the image periphery, even though important image content may be located along the image periphery.
An improved, content-aware image resizing method that removed or inserted pixels along optimal minimum energy paths and, thereby, avoided obscuring important (i.e., higher energy) image content was described in S. Avidan et al., “Seam Carving for Content Aware Image Resizing,” 26 ACM Transactions on Graphics 10-18 (2007). As disclosed in that article, as well as in U.S. Pat. No. 7,747,107 to Avidan et al., the method includes applying an energy function (e.g., gradient magnitude, entropy, etcetera) to a source image to determine the “importance” of each pixel in the source image. A seam (i.e., a set of pixels, one pixel wide, crossing the image from one edge to an opposite edge) having minimal energy is then determined using dynamic programming. Finally, the seam of pixels is either removed to reduce the size of the image or augmented (i.e., pixels are inserted along the seam) to enlarge the size of the image. As such, that content-aware image resizing method is often referred to as “seam carving.” The algorithm may be repeated in horizontal and/or vertical dimensions to achieve the desired image resizing, while preserving the content of the image as defined by the energy function).
The foregoing content-aware image resizing method, however, is computationally intensive and slow, primarily due to the use of dynamic programming to search for a minimal energy seam through all pixels of the source image. For instance, resizing a single image often requires several seconds (e.g., about 5 seconds to reduce a 600×800 pixel image's width by half). Systems and methods that provide more computationally efficient content-aware image resizing may allow a user of a mobile computing device to perform on-the-fly editing of images captured by a camera of the mobile computing device.